#include "stdafx.h"
#include "BasicGlobalHelper.h"

#include <shlwapi.h>
#pragma comment(lib,"shlwapi.lib")

namespace BasicSkinView
{
	std::wstring BasicGlobalHelper::MakePathFromBase( const wchar_t* szPath )
	{
		wchar_t buf[MAX_PATH];
		::GetModuleFileName(NULL,buf,MAX_PATH);
		PathRemoveFileSpec(buf);

		wstring strPath = buf;

		if (szPath[0] != L'\\')
			strPath += L"\\";

		strPath += szPath;

		return strPath;
	}

	void* BasicGlobalHelper::TranslateMemberFuntionAddressToPVoid( void* obj,... )
	{
		va_list argptr;
		va_start(argptr, obj);
		return va_arg( argptr, void* );
	}
}